package com.cungmua.app.model.request;

import com.cungmua.app.utils.AppUtils;
import com.fasterxml.jackson.annotation.JsonProperty;

/**
 * Created by kelvin.nguyen on 6/25/14.
 */
public class DistrictRequest extends AuthenticatedRequest {
    public static final int ALL = 1;
    public static final int SHIPPABLE = 2;
    private int cityId;
    private int districtType;
    private int currentCityId;

    public DistrictRequest(String deviceId, String token) {
        super(deviceId, token);
    }

    @JsonProperty("CityId")
    public int getCityId() {
        return cityId;
    }

    public void setCityId(int cityId) {
        this.cityId = cityId;
    }

    @JsonProperty("CurrentCity")
    public int getCurrentCityId() {
        return currentCityId;
    }

    public void setCurrentCityId(int currentCityId) {
        this.currentCityId = currentCityId;
    }

    @JsonProperty("Type")
    public int getDistrictType() {
        return districtType;
    }

    public void setDistrictType(int districtType) {
        this.districtType = districtType;
    }

    @Override
    public String getSign() {
        return AppUtils.MD5(String.valueOf(getCityId()) + getVersion() + getDeviceId() + getToken());
    }

}
